import VueRouter from "vue-router";
//导入组件模块
import home from "./components/tabbar/home.vue"
import menber from "./components/tabbar/menber.vue"
import shopcar from "./components/tabbar/shopcar.vue"
import search from "./components/tabbar/search.vue"
import newslist from "./components/news/newslist.vue"
import newsinfo from "./components/news/newsinfo.vue"
import photolist from "./components/photos/photolist.vue"
import photoinfo from "./components/photos/photoinfo.vue"
import goodslist from "./components/goods/goodslist.vue"
import goodDetail from "./components/goods/goodDetail.vue"
import goodsDesc from "./components/goods/goodsDesc.vue"
import goodsComment from "./components/goods/goodsComment.vue"
const router = new VueRouter({
    routes: [
        { path: "/", redirect: "/home" },
        { path: "/home", component: home },
        { path: "/menber", component: menber },
        { path: "/shopcar", component: shopcar },
        { path: "/search", component: search },
        { path: "/home/newslist", component: newslist },
        { path: '/home/newsinfo/:id', component: newsinfo },
        { path: "/home/photolist", component: photolist },
        { path: "/home/photoinfo/:id", component: photoinfo },
        {path:"/home/goodslist",component:goodslist},
        {path:"/home/goodDetail/:id",component:goodDetail,name:"goodDetail"},
        {path:"/home/goodsDesc/:id",component:goodsDesc,name:"goodsDesc"},
        {path:"/home/goodsComment/:id",component:goodsComment,name:"goodsComment"}
    ],
    //这是修改router默认的高亮类名为mui样式表中的高亮类名，默认为router-link-active
    linkActiveClass: "mui-active"
});
export default router;